package com.itheima.App;

import com.itheima.Dao.BookDao;
import com.itheima.Service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Booktest {
    public static void main(String[] args) {
        ApplicationContext ca = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookDao bean = ca.getBean(BookDao.class);
        bean.save();

        ApplicationContext cx = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookService bean1 = cx.getBean(BookService.class);
        System.out.println(bean1);


    }
}
